Integrand size = 31, antiderivative size = 113 \[ \int (a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {B (b c-a d)^2 n x}{3 d^2}-\frac {B (b c-a d) n (a+b x)^2}{6 b d}-\frac {B (b c-a d)^3 n \log (c+d x)}{3 b d^3}+\frac {(a+b x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{3 b} \]
1/3*B*(-a*d+b*c)^2*n*x/d^2-1/6*B*(-a*d+b*c)*n*(b*x+a)^2/b/d-1/3*B*(-a*d+b* c)^3*n*ln(d*x+c)/b/d^3+1/3*(b*x+a)^3*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))/b
Time = 0.19 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.72 \[ \int (a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {b d x \left (2 a^2 d^2 (3 A+2 B n)+a b d (-6 B c n+6 A d x+B d n x)+b^2 \left (2 A d^2 x^2+B c n (2 c-d x)\right )\right )-4 a^3 B d^3 n \log (a+b x)-2 B \left (b^3 c^3-3 a b^2 c^2 d+3 a^2 b c d^2-3 a^3 d^3\right ) n \log (c+d x)+2 B d^3 \left (3 a^3+3 a^2 b x+3 a b^2 x^2+b^3 x^3\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{6 b d^3} \]
(b*d*x*(2*a^2*d^2*(3*A + 2*B*n) + a*b*d*(-6*B*c*n + 6*A*d*x + B*d*n*x) + b ^2*(2*A*d^2*x^2 + B*c*n*(2*c - d*x))) - 4*a^3*B*d^3*n*Log[a + b*x] - 2*B*( b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - 3*a^3*d^3)*n*Log[c + d*x] + 2*B* d^3*(3*a^3 + 3*a^2*b*x + 3*a*b^2*x^2 + b^3*x^3)*Log[(e*(a + b*x)^n)/(c + d *x)^n])/(6*b*d^3)
Time = 0.25 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.93, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {2948, 49, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b x)^2 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right ) \, dx\) |
\(\Big \downarrow \) 2948 |
\(\displaystyle \frac {(a+b x)^3 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{3 b}-\frac {B n (b c-a d) \int \frac {(a+b x)^2}{c+d x}dx}{3 b}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {(a+b x)^3 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{3 b}-\frac {B n (b c-a d) \int \left (\frac {(a d-b c)^2}{d^2 (c+d x)}-\frac {b (b c-a d)}{d^2}+\frac {b (a+b x)}{d}\right )dx}{3 b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(a+b x)^3 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{3 b}-\frac {B n (b c-a d) \left (\frac {(b c-a d)^2 \log (c+d x)}{d^3}-\frac {b x (b c-a d)}{d^2}+\frac {(a+b x)^2}{2 d}\right )}{3 b}\) |
-1/3*(B*(b*c - a*d)*n*(-((b*(b*c - a*d)*x)/d^2) + (a + b*x)^2/(2*d) + ((b* c - a*d)^2*Log[c + d*x])/d^3))/b + ((a + b*x)^3*(A + B*Log[(e*(a + b*x)^n) /(c + d*x)^n]))/(3*b)
3.2.49.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ )]*(B_.))*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*( (A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])/(g*(m + 1))), x] - Simp[B*n*((b*c - a*d)/(g*(m + 1))) Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] / ; FreeQ[{a, b, c, d, e, f, g, A, B, m, n}, x] && EqQ[n + mn, 0] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && !(EqQ[m, -2] && IntegerQ[n])
Leaf count of result is larger than twice the leaf count of optimal. \(461\) vs. \(2(105)=210\).
Time = 18.61 (sec) , antiderivative size = 462, normalized size of antiderivative = 4.09
method | result | size |
parallelrisch | \(\frac {6 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a^{2} b c \,d^{2} n -6 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a \,b^{2} c^{2} d n -6 B \ln \left (b x +a \right ) a^{2} b c \,d^{2} n^{2}+6 B \ln \left (b x +a \right ) a \,b^{2} c^{2} d \,n^{2}+6 B \,x^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a \,b^{2} d^{3} n +6 B x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a^{2} b \,d^{3} n -6 B x a \,b^{2} c \,d^{2} n^{2}+B \,a^{2} b c \,d^{2} n^{2}+5 B a \,b^{2} c^{2} d \,n^{2}-12 A \,a^{2} b c \,d^{2} n +6 A \,x^{2} a \,b^{2} d^{3} n +4 B x \,a^{2} b \,d^{3} n^{2}+2 B x \,b^{3} c^{2} d \,n^{2}+6 A x \,a^{2} b \,d^{3} n +2 B \,x^{3} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{3} d^{3} n +B \,x^{2} a \,b^{2} d^{3} n^{2}-B \,x^{2} b^{3} c \,d^{2} n^{2}+2 B \ln \left (b x +a \right ) a^{3} d^{3} n^{2}-2 B \ln \left (b x +a \right ) b^{3} c^{3} n^{2}+2 A \,x^{3} b^{3} d^{3} n +2 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{3} c^{3} n -4 B \,a^{3} d^{3} n^{2}-2 B \,b^{3} c^{3} n^{2}-6 A \,a^{3} d^{3} n}{6 b \,d^{3} n}\) | \(462\) |
risch | \(\text {Expression too large to display}\) | \(1323\) |
1/6*(6*B*ln(e*(b*x+a)^n/((d*x+c)^n))*a^2*b*c*d^2*n-6*B*ln(e*(b*x+a)^n/((d* x+c)^n))*a*b^2*c^2*d*n-6*B*ln(b*x+a)*a^2*b*c*d^2*n^2+6*B*ln(b*x+a)*a*b^2*c ^2*d*n^2+6*B*x^2*ln(e*(b*x+a)^n/((d*x+c)^n))*a*b^2*d^3*n+6*B*x*ln(e*(b*x+a )^n/((d*x+c)^n))*a^2*b*d^3*n-6*B*x*a*b^2*c*d^2*n^2+B*a^2*b*c*d^2*n^2+5*B*a *b^2*c^2*d*n^2-12*A*a^2*b*c*d^2*n+6*A*x^2*a*b^2*d^3*n+4*B*x*a^2*b*d^3*n^2+ 2*B*x*b^3*c^2*d*n^2+6*A*x*a^2*b*d^3*n+2*B*x^3*ln(e*(b*x+a)^n/((d*x+c)^n))* b^3*d^3*n+B*x^2*a*b^2*d^3*n^2-B*x^2*b^3*c*d^2*n^2+2*B*ln(b*x+a)*a^3*d^3*n^ 2-2*B*ln(b*x+a)*b^3*c^3*n^2+2*A*x^3*b^3*d^3*n+2*B*ln(e*(b*x+a)^n/((d*x+c)^ n))*b^3*c^3*n-4*B*a^3*d^3*n^2-2*B*b^3*c^3*n^2-6*A*a^3*d^3*n)/b/d^3/n
Leaf count of result is larger than twice the leaf count of optimal. 282 vs. \(2 (105) = 210\).
Time = 0.28 (sec) , antiderivative size = 282, normalized size of antiderivative = 2.50 \[ \int (a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {2 \, A b^{3} d^{3} x^{3} + {\left (6 \, A a b^{2} d^{3} - {\left (B b^{3} c d^{2} - B a b^{2} d^{3}\right )} n\right )} x^{2} + 2 \, {\left (3 \, A a^{2} b d^{3} + {\left (B b^{3} c^{2} d - 3 \, B a b^{2} c d^{2} + 2 \, B a^{2} b d^{3}\right )} n\right )} x + 2 \, {\left (B b^{3} d^{3} n x^{3} + 3 \, B a b^{2} d^{3} n x^{2} + 3 \, B a^{2} b d^{3} n x + B a^{3} d^{3} n\right )} \log \left (b x + a\right ) - 2 \, {\left (B b^{3} d^{3} n x^{3} + 3 \, B a b^{2} d^{3} n x^{2} + 3 \, B a^{2} b d^{3} n x + {\left (B b^{3} c^{3} - 3 \, B a b^{2} c^{2} d + 3 \, B a^{2} b c d^{2}\right )} n\right )} \log \left (d x + c\right ) + 2 \, {\left (B b^{3} d^{3} x^{3} + 3 \, B a b^{2} d^{3} x^{2} + 3 \, B a^{2} b d^{3} x\right )} \log \left (e\right )}{6 \, b d^{3}} \]
1/6*(2*A*b^3*d^3*x^3 + (6*A*a*b^2*d^3 - (B*b^3*c*d^2 - B*a*b^2*d^3)*n)*x^2 + 2*(3*A*a^2*b*d^3 + (B*b^3*c^2*d - 3*B*a*b^2*c*d^2 + 2*B*a^2*b*d^3)*n)*x + 2*(B*b^3*d^3*n*x^3 + 3*B*a*b^2*d^3*n*x^2 + 3*B*a^2*b*d^3*n*x + B*a^3*d^ 3*n)*log(b*x + a) - 2*(B*b^3*d^3*n*x^3 + 3*B*a*b^2*d^3*n*x^2 + 3*B*a^2*b*d ^3*n*x + (B*b^3*c^3 - 3*B*a*b^2*c^2*d + 3*B*a^2*b*c*d^2)*n)*log(d*x + c) + 2*(B*b^3*d^3*x^3 + 3*B*a*b^2*d^3*x^2 + 3*B*a^2*b*d^3*x)*log(e))/(b*d^3)
Exception generated. \[ \int (a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\text {Exception raised: HeuristicGCDFailed} \]
Leaf count of result is larger than twice the leaf count of optimal. 294 vs. \(2 (105) = 210\).
Time = 0.20 (sec) , antiderivative size = 294, normalized size of antiderivative = 2.60 \[ \int (a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {1}{3} \, B b^{2} x^{3} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {1}{3} \, A b^{2} x^{3} + B a b x^{2} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a b x^{2} + B a^{2} x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a^{2} x + \frac {{\left (\frac {a e n \log \left (b x + a\right )}{b} - \frac {c e n \log \left (d x + c\right )}{d}\right )} B a^{2}}{e} - \frac {{\left (\frac {a^{2} e n \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} e n \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c e n - a d e n\right )} x}{b d}\right )} B a b}{e} + \frac {{\left (\frac {2 \, a^{3} e n \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} e n \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d e n - a b d^{2} e n\right )} x^{2} - 2 \, {\left (b^{2} c^{2} e n - a^{2} d^{2} e n\right )} x}{b^{2} d^{2}}\right )} B b^{2}}{6 \, e} \]
1/3*B*b^2*x^3*log((b*x + a)^n*e/(d*x + c)^n) + 1/3*A*b^2*x^3 + B*a*b*x^2*l og((b*x + a)^n*e/(d*x + c)^n) + A*a*b*x^2 + B*a^2*x*log((b*x + a)^n*e/(d*x + c)^n) + A*a^2*x + (a*e*n*log(b*x + a)/b - c*e*n*log(d*x + c)/d)*B*a^2/e - (a^2*e*n*log(b*x + a)/b^2 - c^2*e*n*log(d*x + c)/d^2 + (b*c*e*n - a*d*e *n)*x/(b*d))*B*a*b/e + 1/6*(2*a^3*e*n*log(b*x + a)/b^3 - 2*c^3*e*n*log(d*x + c)/d^3 - ((b^2*c*d*e*n - a*b*d^2*e*n)*x^2 - 2*(b^2*c^2*e*n - a^2*d^2*e* n)*x)/(b^2*d^2))*B*b^2/e
Leaf count of result is larger than twice the leaf count of optimal. 241 vs. \(2 (105) = 210\).
Time = 0.83 (sec) , antiderivative size = 241, normalized size of antiderivative = 2.13 \[ \int (a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {B a^{3} n \log \left (b x + a\right )}{3 \, b} + \frac {1}{3} \, {\left (B b^{2} \log \left (e\right ) + A b^{2}\right )} x^{3} - \frac {{\left (B b^{2} c n - B a b d n - 6 \, B a b d \log \left (e\right ) - 6 \, A a b d\right )} x^{2}}{6 \, d} + \frac {1}{3} \, {\left (B b^{2} n x^{3} + 3 \, B a b n x^{2} + 3 \, B a^{2} n x\right )} \log \left (b x + a\right ) - \frac {1}{3} \, {\left (B b^{2} n x^{3} + 3 \, B a b n x^{2} + 3 \, B a^{2} n x\right )} \log \left (d x + c\right ) + \frac {{\left (B b^{2} c^{2} n - 3 \, B a b c d n + 2 \, B a^{2} d^{2} n + 3 \, B a^{2} d^{2} \log \left (e\right ) + 3 \, A a^{2} d^{2}\right )} x}{3 \, d^{2}} - \frac {{\left (B b^{2} c^{3} n - 3 \, B a b c^{2} d n + 3 \, B a^{2} c d^{2} n\right )} \log \left (-d x - c\right )}{3 \, d^{3}} \]
1/3*B*a^3*n*log(b*x + a)/b + 1/3*(B*b^2*log(e) + A*b^2)*x^3 - 1/6*(B*b^2*c *n - B*a*b*d*n - 6*B*a*b*d*log(e) - 6*A*a*b*d)*x^2/d + 1/3*(B*b^2*n*x^3 + 3*B*a*b*n*x^2 + 3*B*a^2*n*x)*log(b*x + a) - 1/3*(B*b^2*n*x^3 + 3*B*a*b*n*x ^2 + 3*B*a^2*n*x)*log(d*x + c) + 1/3*(B*b^2*c^2*n - 3*B*a*b*c*d*n + 2*B*a^ 2*d^2*n + 3*B*a^2*d^2*log(e) + 3*A*a^2*d^2)*x/d^2 - 1/3*(B*b^2*c^3*n - 3*B *a*b*c^2*d*n + 3*B*a^2*c*d^2*n)*log(-d*x - c)/d^3
Time = 1.03 (sec) , antiderivative size = 262, normalized size of antiderivative = 2.32 \[ \int (a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (B\,a^2\,x+B\,a\,b\,x^2+\frac {B\,b^2\,x^3}{3}\right )+x^2\,\left (\frac {b\,\left (9\,A\,a\,d+3\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{6\,d}-\frac {A\,b\,\left (3\,a\,d+3\,b\,c\right )}{6\,d}\right )-x\,\left (\frac {\left (\frac {b\,\left (9\,A\,a\,d+3\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{3\,d}-\frac {A\,b\,\left (3\,a\,d+3\,b\,c\right )}{3\,d}\right )\,\left (3\,a\,d+3\,b\,c\right )}{3\,b\,d}-\frac {a\,\left (3\,A\,a\,d+3\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {A\,a\,b\,c}{d}\right )+\frac {A\,b^2\,x^3}{3}-\frac {\ln \left (c+d\,x\right )\,\left (3\,B\,n\,a^2\,c\,d^2-3\,B\,n\,a\,b\,c^2\,d+B\,n\,b^2\,c^3\right )}{3\,d^3}+\frac {B\,a^3\,n\,\ln \left (a+b\,x\right )}{3\,b} \]
log((e*(a + b*x)^n)/(c + d*x)^n)*((B*b^2*x^3)/3 + B*a^2*x + B*a*b*x^2) + x ^2*((b*(9*A*a*d + 3*A*b*c + B*a*d*n - B*b*c*n))/(6*d) - (A*b*(3*a*d + 3*b* c))/(6*d)) - x*((((b*(9*A*a*d + 3*A*b*c + B*a*d*n - B*b*c*n))/(3*d) - (A*b *(3*a*d + 3*b*c))/(3*d))*(3*a*d + 3*b*c))/(3*b*d) - (a*(3*A*a*d + 3*A*b*c + B*a*d*n - B*b*c*n))/d + (A*a*b*c)/d) + (A*b^2*x^3)/3 - (log(c + d*x)*(B* b^2*c^3*n + 3*B*a^2*c*d^2*n - 3*B*a*b*c^2*d*n))/(3*d^3) + (B*a^3*n*log(a + b*x))/(3*b)